/*
 * Control.h
 *
 *  Created on: 15.03.2013
 *      Author: mag
 */

#ifndef CONTROL_H_
#define CONTROL_H_


#include "TimeTagger.h"


class Control {
public:
	Control();
	~Control();

	/** start TimeTagger workerthreads */
	static void start();

	/** stop TimeTagger workerthreads */
	static void stop();

	/** returns true if TimeTagger is running */
	static bool is_running();

	/** returns true if TimeTagger is running and actual measurement in progress */
	static bool is_measuring();

	/** returns TimeTagger status: 0 UNCONFIGURED, 1: RUNNING, 2: STOPPED, 3: ERROR */
	//static int get_status();

	void shutdown();

	static int find_module_slot();
	static _Iterator *get_module_slot(int);
	static void set_module_slot(int, _Iterator *);
	static _Iterator **get_module_slots(size_t &);

protected:
	/** get TimeTagger instance */
	static _Tagger *getTagger();

	static _Iterator *module_slots[];
};

#endif /* CONTROL_H_ */
